using System;
using System.Collections.Generic;
using System.Text;

namespace Kevin.Framework.Data.OrmMapping
{
    [AttributeUsage(AttributeTargets.Property|AttributeTargets.Field,AllowMultiple=true,Inherited=true)]
    public class SubClassFieldMappingAttribute:FieldMappingAttribute
    {
        private string subPropertyName = "";

        protected SubClassFieldMappingAttribute() { }

        public SubClassFieldMappingAttribute(string subPropertyName, string fieldName)
            : base(fieldName)
        {
            this.subPropertyName = subPropertyName;
        }

        public SubClassFieldMappingAttribute(string subPropertyName, string fieldName,bool isNullAble)
            : base(fieldName,isNullAble)
        {
            this.subPropertyName = subPropertyName;
        }

        public string SubPropertyName
        {
            get { return this.subPropertyName; }
            set { this.subPropertyName = value; }
        }
    }
}
